<?php
namespace app\qian\controller;

use think\Controller;
use app\qian\model\AmModel as AmModels;
use think\Db;

class Am extends Controller
{
    private $cModel;   //当前控制器关联模型

    public function _initialize()
    {
        parent::_initialize();
        $this->cModel = new AmModels;   //别名：避免与控制名冲突
    }

    public function index()
    {
        $dataList=Db::table('dy_ng')->select();
        $this->assign('dataList', $dataList);
        $n = Db::table('dy_partner')->select();
        $this->assign('n', $n);
        $nam = Db::table('dy_movie')->select();
        $this->assign('nam', $nam);
        $na = Db::table('dy_tv')->select();
        $this->assign('na', $na);
        $m = Db::table('dy_news')->select();
        $this->assign('m', $m);
        return view('index');
    }



}